package com.bt7274.mapper;

import com.bt7274.pojo.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 评论表 ：用户发表的评论 Mapper 接口
 * </p>
 *
 * @author hp
 * @since 2025-03-25
 */
public interface CommentMapper extends BaseMapper<Comment> {

    int insertComment(Comment comment);

    void deleteCommentById(String commentId);

    List<Comment> selectCommentsByPostId(@Param("postId") String postId,
                                        @Param("offset") int offset,
                                        @Param("pageSize") int pageSize);


    Comment selectCommentById(String id);

}
